function CreateSlideBoxobj(objname,imgwidth,imgheight){
	this.name=objname;
	this.widthvalue=imgwidth;
	this.heightvalue=imgheight;
	this.windownowwidth=0;
	this.windownextwidth=0;
	this.windowbl=imgwidth/imgheight;
	this.resetwidth1=function(){
		this.windownextwidth=$("#"+this.name).parent().width();
		if (this.windownowwidth!=this.windownextwidth){
			this.windownowwidth=this.windownextwidth;
			$("#"+this.name).width(this.windownowwidth);
			if (this.windownowwidth<this.widthvalue){
				if (this.windownowwidth<1300 && this.widthvalue>1300){
					this.windowbl=this.windownowwidth/1300;
					$("#"+this.name+" div.bd").width(this.widthvalue*this.windowbl);
					$("#"+this.name+" div.bd").height(this.heightvalue*this.windowbl);
					$("#"+this.name).scrollLeft(parseInt(($("#"+this.name+" div.bd").width()-this.windownowwidth)/2));
				}
				else{
					$("#"+this.name+" div.bd").width(this.widthvalue);
					$("#"+this.name+" div.bd").height(this.heightvalue);
					$("#"+this.name).scrollLeft(parseInt((this.widthvalue-this.windownowwidth)/2))
				}
			}
			else{
				$("#"+this.name+" div.bd").width(this.widthvalue);
				$("#"+this.name+" div.bd").height(this.heightvalue)
			}
		}
		eval("window.Obj"+this.name+"=this");
		setTimeout("window.Obj"+this.name+".resetwidth1()",50)
	}
	this.resetwidth2=function(){
		this.windownextwidth=$("#"+this.name).parent().width();
		if (this.windownowwidth!=this.windownextwidth){
			this.windownowwidth=this.windownextwidth;
			$("#"+this.name).width(this.windownowwidth);
			if (this.windownowwidth<this.widthvalue){
				$("#"+this.name+" div.bd").width(this.windownowwidth);
				$("#"+this.name+" div.bd").height(this.windownowwidth/this.windowbl)
			}
			else{
				$("#"+this.name+" div.bd").width(this.widthvalue);
				$("#"+this.name+" div.bd").height(this.heightvalue)
			}
		}
		eval("window.Obj"+this.name+"=this");
		setTimeout("window.Obj"+this.name+".resetwidth2()",50)
	}
}
function SlideBoxObj(objname,looptype,cutset,imgwidth,imgheight){
	var SlideBoxObjexample=new CreateSlideBoxobj(objname,imgwidth,imgheight);
	$("#"+objname+" div.bd").css("width",imgwidth+"px").css("height",imgheight+"px");
	for (var i=0;i<$("#"+objname+" div.bd > ul > li").length;i++){
		$("#"+objname+" div.hd > ul").append('<li></li>');
		if ($("#"+objname+" div.bd > div > div")[i].innerHTML != "") {
			$("#"+objname+" div.bd > ul > li")[i].innerHTML=$("#"+objname+" div.bd > div > div")[i].innerHTML
		}
	}
	if ($("#"+objname+" div.bd > ul > li").length<2){
		$("#"+objname+" div.hd").hide();
	}
	$("#"+objname+" div.SlidBoxObj").slide({mainCell:".bd ul",effect:looptype,autoPlay:true});
	if (cutset){
		SlideBoxObjexample.resetwidth1()
	}
	else{
		SlideBoxObjexample.resetwidth2()
	}
}